package Pro;

public class ClientClass {
    public static void main(String[] args) throws CloneNotSupportedException {
        MyFruit fruit1 = new Apple();
        MyFruit fruit2 = new Banana();
        MyFruitStore.Add(1,fruit1);
        MyFruitStore.Add(2,fruit2);
        MyFruitStore.Add(3,new Apple());
        MyFruitStore.Add(4,new Banana());
        MyFruit fruit = (MyFruit) MyFruitStore.Get(3); //克隆得到
        fruit.display();
    }
}
